import { _decorator, Component, Label, Node } from "cc";
const { ccclass, property } = _decorator;

@ccclass("GameOverUI")
export class GameOverUI extends Component {
  @property(Label)
  public highestScoreLabel: Label = null;

  @property(Label)
  public currentScoreLabel: Label = null;

  start() {}

  update(deltaTime: number) {}

  public showGameOverUI(highestScore: number, currentScore: number) {
    this.node.active = true;
    this.highestScoreLabel.string = highestScore.toString();
    this.currentScoreLabel.string = currentScore.toString();
  }

  public hideGameOverUI() {
    this.node.active = false;
    this.highestScoreLabel.string = '0';
    this.currentScoreLabel.string = '0';
  }
}
